package com.zhang.family_doctor.service;

import com.github.pagehelper.PageInfo;
import com.zhang.family_doctor.dto.PaymentDto;
import com.zhang.family_doctor.dto.SignUpDetailsDto;
import com.zhang.family_doctor.dto.SignUpDto;
import com.zhang.family_doctor.entity.R;
import com.zhang.family_doctor.entity.SignUp;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface SignUpService {
    /**
     * 居民提交申请签约
     * @param signUp
     * @param request
     * @return
     */
    R<String> applySigning(SignUp signUp, HttpServletRequest request);

    /**
     * 审核通过签约申请
     * @param signUp
     * @param request
     * @return
     */
    R<String> doctorAudit(SignUp signUp, HttpServletRequest request);

    /**
     * 驳回申请
     * @param signUp
     * @param request
     * @return
     */
    R<String> reject(SignUp signUp, HttpServletRequest request);


    /**
     * 续约申请
     * @param signUp
     * @return
     */
    R<String> renewalApplication(SignUp signUp);

    /**
     * 通过续约申请
     * @param signUp
     * @param request
     * @return
     */
    R<String> renewalApproved(SignUp signUp, HttpServletRequest request);

    /**
     * 驳回续约申请
     * @param signUp
     * @param request
     * @return
     */
    R<String> rejectRenewalApplication(SignUp signUp, HttpServletRequest request);

    /**
     * 调用微信练习中的微信支付接口
     * @return
     * @param paymentDto
     */
    R<String> weChatPayment(PaymentDto paymentDto);

    /**
     * 支付成功的接口
     * @param paymentDto
     * @return
     */
    R<String> paymentSucceeded(PaymentDto paymentDto);

    /**
     * 调用微信练习中的支付宝支付接口
     * @param paymentDto
     * @return
     */
    R<String> alipayPayment(PaymentDto paymentDto);

    /**
     * 居民端查看签约记录
     * @param request
     * @return
     */
    R<List<SignUp>> getSignUp(HttpServletRequest request);

    /**
     * 居民端查看签约详情
     * @param id
     * @return
     */
    R<SignUpDetailsDto> getSignUpDetails(Integer id);

    /**
     * 分页查询待处理签约
     * @param signUpDto
     * @return
     */
    R<PageInfo<SignUpDto>> getPending(SignUpDto signUpDto);
}
